using System;
using System.Collections.Generic;
using System.Text;

using ThatsMeSDK.Core;

namespace ThatsMeSDK
{
	public class Member : MemberBase
	{
		public Member(string nick)
		{
			Nick = nick;
		}
		
		public void AddAsFriend()
		{
			throw new NotImplementedException();
		}
		
		public override void LoadMyUser()
        {
#warning Member returns null! Please make it asynchron
            Member member = null; // ServiceHandler.GetMemberByNick(Nick);
			
			//don't work... call a endless loop of request
			Birthday = member.Birthday;
			Canton = member.Canton;
			Categories = member.Categories;
			//Description = member.Description;
			//Friends = member.Friends;
			Gallery = member.Gallery;
			Id = member.Id;
			ProfilePictureUri = member.ProfilePictureUri;
			ProfileUri = member.ProfileUri;
			//RealName = member.RealName;
			Sex = member.Sex;
		}
		
		public User ConvertToUser()
		{
			User newUser = new User(null,null);
			newUser.Birthday = Birthday;
			newUser.Canton = Canton;
			newUser.Categories = Categories;
			newUser.Description = Description;
			newUser.Friends = Friends;
			newUser.Gallery = Gallery;
			newUser.Id = Id;
			newUser.Nick = Nick;
			newUser.ProfilePictureUri = ProfilePictureUri;
			newUser.ProfileUri = ProfileUri;
			newUser.RealName = RealName;
			newUser.Sex = Sex;
			newUser.LoadMyMailBox();
			return newUser;
		}
    }
}
